#define _CRT_SECURE_NO_WARNINGS
#include "SeqList.h"


void SLTest()
{
	Seqlist s;
	SLInit(&s);

	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPushBack(&s, 5);
	SLPushBack(&s, 6);
	SLPushBack(&s, 7);
	SLPrint(&s);


	SLDestroy(&s);

}

void SLTest1()
{
	Seqlist s;
	SLInit(&s);

	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPrint(&s);
	SLPushFront(&s, 5);
	SLPrint(&s);

	SLPushFront(&s, 6);
	SLPrint(&s);

	SLPushFront(&s, 7);
	SLPrint(&s);

	SLPushFront(&s, 8);
	SLPrint(&s);

	SLDestroy(&s);
}

void SLTest2()
{
	Seqlist s;
	SLInit(&s);

	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPrint(&s);

	SLErase(&s, 1);
	SLPrint(&s);

	SLErase(&s, 1);
	SLPrint(&s); 

	SLErase(&s, 1);
	SLPrint(&s); 

	SLErase(&s, 0);
	SLPrint(&s); 

	SLErase(&s, 0);
	SLPrint(&s);

	//SLPopFront(&s);
	//SLPrint(&s);
	SLDestroy(&s);

}

void SLTest3()
{
	Seqlist s;
	SLInit(&s);

	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPrint(&s);

	int pos = SLFind(&s, 4);
	if (pos != -1)
	{
		printf("%d\n", pos);
	}

	SLModify(&s, pos, 100);
	SLPrint(&s);

}
int main()
{
	SLTest();
	return 0;
}